/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@list-prefix-cls: ~'@{css-prefix}mobile-list';
@svg-prefix-cls: ~'@{css-prefix}svg';

.@{list-prefix-cls} {
  width: 100%;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--ti-mobile-list-bgcolor, #fff);
  box-sizing: border-box;
  position: relative;

  &:active {
    background-color: var(--ti-mobile-list-active-bgcolor, #ddd);
  }

  &:not(:last-child)::after {
    position: absolute;
    box-sizing: border-box;
    content: ' ';
    pointer-events: none;
    right: 0;
    bottom: 0;
    left: 16px;
    border-bottom: 1px solid var(--ti-mobile-list-border-color, #ddd);
    transform: scaleY(0.5);
  }

  &.is-padding {
    padding: 12px 16px;
  }

  &__content {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  &__content-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  &__main-text {
    color: var(--ti-mobile-list-main-text-color, #333);
    font-size: var(--ti-mobile-list-main-text-font-size, 16px);
  }

  &__sub-text {
    color: var(--ti-mobile-list-sub-text-color, #999);
    font-size: var(--ti-mobile-list-sub-text-font-size, 14px);
  }

  &__content-des {
    color: var(--ti-mobile-list-content-des-color, #999);
    font-size: var(--ti-mobile-list-content-des-font-size, 12px);
    margin: 4px 0 0;
  }

  &__prefix {
    margin-right: 16px;

    .@{svg-prefix-cls} {
      font-size: var(--ti-mobile-list-prefix-size, 24px);
    }
  }

  &__suffix {
    margin-left: 16px;

    .@{svg-prefix-cls} {
      fill: var(--ti-mobile-list-suffix-color, #999);
      font-size: var(--ti-mobile-list-suffix-size, 16px);
    }
  }

  &.is-show-prefix:not(:last-child)::after {
    left: 56px;
  }
}
